<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jquery-3.6.0.js"></script>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        .tab{
            background-color: #F7F7F7;
            
            border-bottom:1px solid red;
        }
        .li-list{
            display: flex;
        }
        .li-list li{
            width: 120px;
            height: 40px;
            list-style: none;
            font-size: 15px;
            text-align: center;
            line-height: 40px;
            cursor: pointer;
        }
        .li-list li:hover{
            color: red;
        }
        .li-list li.current{
            color: white;
            background-color: red;
            cursor: default;
        }
        
    </style>
</head>
<body>
    <div class="tab">
    <ul class="li-list">
        <li class="current">商品介绍</li>
        <li>规格与包装</li>
        <li>售后保障</li>
        <li>商品评价(10万+)</li>
        <li>手机社区</li>
    </ul>
</div>
<script>
    $('.li-list>li').click(function(){
        $('.current').removeClass('current');
        $(this).addClass('current');
    })
    
    
</script>
</body>

</html> 